const load = require('./import/_import_' + process.env.NODE_ENV);

export default [
	{
		name: 'auth',
		path: '/auth',
		meta: {permissionCode: '*'},
		component: load('views/auth/index'),
		children: [
			{
				name: 'login',
				path: 'login',
				meta: {permissionCode: '*'},
				component: load('views/auth/login')
			},
			{
				name: 'registry',
				path: 'registry',
				meta: {permissionCode: '*'},
				component: load('views/auth/registry')
			},
			{
				path: 'fail',
				name: 'fail',
				component: load('views/auth/fail'),
				meta: {permissionCode: '*'}
			},
		]
	},
	{
		path: '/',
		meta: {permissionCode: '*'},
		component: load('views/layout/index'),
		children: [
			{
				path: 'index',
				name: 'index',
				meta: {permissionCode: 'index'},
				component: load('views/index/index')
			},
			{
				path: 'system',
				name: 'system',
				meta: {permissionCode: 'system'},
				children:  [
					{
						path: 'message',
						name: 'message',
						meta: {permissionCode: 'message'},
						component: load('views/system/message/index'),
					},
					{
						path: 'account',
						name: 'account',
						meta: {permissionCode: 'account'},
						component: load('views/system/account/index'),
					},
					{
						path: 'role',
						name: 'role',
						meta: {permissionCode: 'role'},
						component: load('views/system/role/index'),
					},
					{
						path: 'menu',
						name: 'menu',
						meta: {permissionCode: 'menu'},
						component: load('views/system/menu/index'),
					},
					{
						path: 'dict',
						name: 'dict',
						meta: {permissionCode: 'dict'},
						component: load('views/system/dict/index'),
					}
				]
			}
		]
	},
];
